﻿@model KPIS.GERP.Models.ICM.InventoryStockTaking
@{
    var WarehouseService = new KPIS.GERP.WEB.GIMS.WarehouseService.WarehouseServiceClient();
    var JobSiteService = new KPIS.GERP.WEB.GIMS.JobsiteService.JobsiteServiceClient();
}

@Html.HiddenFor(model => model.RecordStatus)

<div class="widget-box">
	<div class="widget-header header-color-blue2">
        <h4 class="lighter smaller">ข้อมูลหลัก</h4>
    </div>
    <div class="widget-body">
        <div class="widget-body-inner">
			<div class="widget-main form-horizontal">
                <div class="control-group">
                    <div class="control-label">
                        @Html.DisplayName("วันที่รายการ :")
                    </div>
                    <div class="controls-detail" style="margin-top:5px !important;">
                        @Html.DisplayFor(model => model.CreatedWhen)
                    </div>            
                </div>
                <div class="control-group">
                    <div class="control-label">
                        @Html.DisplayName("เรื่อง :")
                    </div>
                    <div class="controls-detail" style="margin-top:5px !important;">
                        @Html.DisplayFor(model => model.StockTakingDesc)
                    </div>            
                </div>
                <div class="control-group">
                    <div class="control-label">
                        @Html.DisplayName("ประเภทพัสดุ :")
                    </div>
                    <div class="controls-detail" style="margin-top:5px !important;">
                       @* @{
                            string ResourceTypeName = null;
                            //if(Model.ResourceTypeId == 39){ ResourceTypeName = "วัสดุ";}
                            //else { ResourceTypeName = "ครุภัณฑ์"; }
                            if (Model.ResourceTypeId == 1) { ResourceTypeName = "วัสดุ"; }
                            else { ResourceTypeName = "ครุภัณฑ์"; }
                        }
                        @Html.DisplayName(ResourceTypeName)*@
                        @Html.DisplayFor(model => model.MasResourceType.Name)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        @Html.DisplayName("วันที่เริ่มนับ :")
                    </div>
                    <div class="controls-detail" style="margin-top:5px !important;">
                        @Html.DisplayFor(model => model.StockTakingStartDate)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        @Html.DisplayName("วันที่สิ้นสุดการตรวจนับ :")
                    </div>
                    <div class="controls-detail" style="margin-top:5px !important;">
                        @Html.DisplayFor(model => model.StockTakingEndDate)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        @Html.DisplayName("รายละเอียดการตรวจนับ :")
                    </div>
                    <div class="controls-detail" style="margin-top:5px !important;">
                        @Html.DisplayFor(model => model.StockTakingRemark)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        @Html.DisplayName("คลังพัสดุ :")
                    </div>
                    <div class="controls-detail" style="margin-top:5px !important;">
                        @*@{
                            string WareHouse = WarehouseService.SelectNameWareHouse(Model.IcmWhId ?? 0);
                        }
                        @Html.DisplayName(WareHouse)*@
                        @Html.DisplayFor(model => model.Warehouse.Name)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                         @Html.DisplayName("หน่วยงาน :")
                    </div>
                    <div class="controls-detail" style="margin-top:5px !important;">
                        @*@{
                            string JobSite = JobSiteService.SelectNameJobSite(Model.JobSiteId ?? 0);
                        }
                        @Html.DisplayName(JobSite)*@
                        @Html.DisplayFor(model => model.JobSite.Name)
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
